package com.uuah.server.api.channel;

import com.uuah.api.lifecycle.IDisposable;
import com.uuah.api.lifecycle.Initialisable;
import com.uuah.server.api.IUuahEvent;
import com.uuah.server.api.IUuahMessage;
import com.uuah.server.api.endpoint.IUuahEndpoint;
import com.uuah.server.exception.MessagingException;

/**
 *
 * TODO comment ...
 *
 * <p>
 * update record:updator，update time，update content and version
 * </p>
 *
 * @author <a href="jonny_quan@hotmail.com">jonny</a>
 * @date 2009 2009-3-26 下午11:28:38
 * @version 1.0.0
 */
public interface IChannel extends Initialisable, IDisposable {

	/**
	 * getEndpoint
	 *
	 * @return
	 */
	IUuahEndpoint getEndpoint();

	/**
	 * set Endpoint
	 *
	 * @param uuahEndpoint
	 */
	void setEndpoint(IUuahEndpoint uuahEndpoint);

	/**
	 *
	 * @param event
	 * @return
	 * @throws MessagingException
	 */
	IUuahMessage route(IUuahEvent event) throws MessagingException;
}
